<script setup>
import {ref, inject, defineProps} from "vue";
import wangeditorUtil from "@/components/utils/wangeditor-util.vue";
import aiUtil from "@/components/utils/ai-util.vue";
import AiUtil from "@/components/utils/ai-util.vue";
const props = defineProps({
  shouReadonly:{
    type:Boolean,
    default:true
  },
  showToolbar:{
    type:Boolean,
    default:false
  },
  showBoeder:{
    type:String,
    default:"0px"
  },
  sectionValue:{
    // TODO: 完成后改为 true
    required: false,
    type: String,
    default:"{'title':'文章标题','content':'文章内容}"
  },
  title: {
    // TODO: 完成后改为 true
    required: false,
    type: String,
    default: '文章标题'
  }
})
console.log(props.sectionValue)
</script>

<template>
  <n-flex vertical class="read">
    <n-space justify="center" class="title-reade">{{ title }}</n-space>
    <n-space vertical class="read-body">
      <wangeditor-util
          :show-toolbar="showToolbar"
          editor-height="28rem"
          :readonly="shouReadonly"
          :border-px="showBoeder"
          :sectionValue="sectionValue"

      />
    </n-space>
  </n-flex>
</template>

<style lang="scss" scoped>
.read{
  position: relative;
}
.read-body{
  //background: #1f436c;
  //width: 100rem;
  background: #fff;
  padding-left: 2rem;
  min-height: 24rem;
}
.title-reade{
  background: #fff;
  font-size: 2rem;
  font-weight: bold;
}
</style>
